I have been wondering for drop-down menus since longtime and its difficult to find a solution for a non-programmer like me. Atlast "Jake Gordon" has made an excellent module Nice Menus . Thanks for the excellent work and keep it up. Though several enhacements has been made to coming Drupal 4.7 menu feature still it lacks drop-down functionality. I hope with this module lacking drupal drop-down Menu feature will be no more.

Sunny
www.gleez.com

Comments

jakeg’s picture

Thanks Sunny! Yes, I released the module yesterday following this discussion and its still a little buggy but gettting there very quickly. Please let me know of any improvements you think I can make to it, or any bugs in the system.

Also, it should be noted that the module is for 4.7/head only at the moment at least.

sangamreddi’s picture

Hi,

I have just installed and it's working fine only the images are missing. I haven't find the arrow-down.gif, arrow-right.gif these images.

It's excellent, only missing horizontal thing in the second layer. Though i am not intrested as of now someone would need it.

Sunny
www.gleez.com

jakeg’s picture

get the latest cvs from http://cvs.drupal.org/viewcvs/drupal/contributions/modules/nice_menus/ which I just upudated 2 minutes ago, including the arrows.

Do you still have the bug you mention?

To make this work with 4.6, I think you can do the following:

If you want the module to work in 4.6, I think all you have to do is edit one line in nice_menus.module:

drupal_add_js(drupal_get_path('module', 'nice_menus').'/nice_menus.js');

... should be changed to:

drupal_set_html_head

daniel.hunt’s picture

*pointless post that is simply to subscribe to thread* :)

sangamreddi’s picture

Now working fine. Thank You once again.

Sunny
www.gleez.com

MaineWebworks’s picture

jakeg -
Great menu system! I'm using 4.6 and would love to get this implemented.
But, I'm a html/css designer not php developer...

It seems like I'm missing something here:

If you want the module to work in 4.6, I think all you have to do is edit one line in nice_menus.module:

drupal_add_js(drupal_get_path('module', 'nice_menus').'/nice_menus.js');

... should be changed to:

drupal_set_html_head

I'm sure there's a closing statement ( ;) at the end of the line. Is there anything else?

TIA for any help.

I also tried adding the JS into the HEAD of page.tpl.php and it didn't work...

jakeg’s picture

sorry i don't have my laptop with me right now, but basically get rid of the drupal_add_js line and replace it with drupal_set_html_head() with a link to the javascript file between the ()... something like

script type='text/javascript' src='modules/nice_menus/nice_menus.js'

... i can't write the full code hear because drupal bulks at the 'suspicious data'

enky’s picture

hi jakeg,

the nicemenus module is cool, thank a lot,

enky

nydrupalfan’s picture

Nice work on the module!

The menu blocks work great for me in drupal 4.6.5 after making the above change within a complete script tag.

The only problem I am having is that none of the administrative options are appearing on admin/settings/nice_menus. I only see a text description of the module and then two buttons (save and restore defaults). Could there be another function that isn't work in 4.6?

Thanks for the help.

jakeg’s picture

Hmm... okay, yeah, the forms API stuff won't work in 4.6. I may look at porting th emodule to 4.6 at some point, but if anyone else wants to too then they're more than welcome

pgregg’s picture

I began porting it but gave up because my boss wants to see something soon, so I'm just going to find something else that'll work in 4.6

I'm sure there must be a way to query what version of drupal is running... (/me goes to check - hmmm doesn't seem to be - crap). we need a DRUPAL_VERSION 4.63 type constant

Anyway, I may as well give back what I did to start the backport - good luck:

// Implemention of hook_menu()
function nice_menus_menu() {
  // Load the necessary JavaScript on every page
  #drupal_add_js(drupal_get_path('module', 'nice_menus').'/nice_menus.js');
  drupal_set_html_head('<'.'script language="JavaScript" src="' . drupal_get_path('module', 'nice_menus').'/nice_menus.js' . ' type="text/javascript"></script>'); # sorry for the '<'. hack - drupal website won't let me actually post the script as a tag
  theme_add_style(drupal_get_path('module', 'nice_menus').'/nice_menus.css');
}

// Implementation of hook_settings()
function nice_menus_settings() {
  $form['nice_menus_number'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of Nice Menus'),
    '#size' => '2',
    '#description' => t('The total number of independend nice menus you want. You configure them as normal in admin/blocks'),
    '#default_value' => variable_get('nice_menus_number', '2')
  );
  #return $form;

  # pgregg 4.6 hack
  $output = '';
  foreach($form as $formname => $data) {
    switch($data['#type']) {
      case 'textfield':
        $output .= form_textfield(t($data['#title']), $formname,
                    variable_get($formname, 'Default setting'),
                    $data['#size'], 255,
                    t($data['#description']));
        break;

      case 'checkbox':
      default:
         break;
    }
  }
  return $output;
}

Not much, but it's a start. Good luck and thanks for your work on it jakeg - I look forward to being able to use it in the future.

jakeg’s picture

I'm working on this now. Should be 4.6 compatible by end of the day... DONE!!!

get it here

nydrupalfan’s picture

Excellent! I needed to add a /script tag in the set_html_head function to get it to work.

The only administrative option that shows up in 4.6.5 for me is:
Number of Nice Menus:
The total number of independend nice menus you want. You configure them as normal in admin/blocks

Should there be more?

Thanks again for your great work jake.

jakeg’s picture

No, that is all. Within the blocks themselves you configure the type of dropdown they are and which menu tree they come from

jamesdixon10’s picture

rrr

nydrupalfan’s picture

I am playing around with the menu module in the Friends Electric theme and noticed that there is a gap between individual menu options. Can anyone tell which css property is causing this? It seems to be in the theme itself as far as I can see.

edit: I fixed it by changing one of the table margin settings to 0 in the theme's style.css file.

jamesdixon10’s picture

dd

laura s’s picture

Looking forward to trying it out!

Laura
===
pingVisionrare patternscattered sunshine

_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet

dreed47’s picture

Nice module. I just submitted a patch for several enhancements to this module.

sangamreddi’s picture

Thanks Der nice enhancements to module. I haven't tested yet. I'll post the outcome.

Sunny
www.gleez.com

patrickharris’s picture

I have avoided menus like this previously, because some people find it hard to navigate with the mouse to the "third level" in. If the mouse leaves the second menu for a moment, the whole pop up disappears.
Usability can be improved if the pop-up menu stays around for a second or two after the mouse has left it. I'm sure this delay could be added with javascript?

Gosh, I'm not describing this well - I hope you know what I mean.

jakeg’s picture

yup i understand completely, though don't know how to make the changes you suggest

daniel.hunt’s picture

While I haven't looked at the source yet - I would imagine that it'd be a simple fix...

Instead of:

If(MouseOut(MyMenuThing))
{
   MyMenuThing.close();
}

....

Setup a separate timer function:

If(MouseOut(MyMenuThing))
{
   new MyMenuTimer(MyMenuThing);
}

.... but that's a gross over-simplification :)

jakeg’s picture

problem is, its all done by css, so i don't think this is possible

daniel.hunt’s picture

Ah - so it's just hiding/unhiding preset div's?
Apologies - I thought it was using javascript.

That's what I get for not looking at the source ;)

sherwoodseo’s picture

Another "stick around for a sec" issue concerns the use of background images. The JS that is used for IE rollovers swaps between on and off modes instantly, and the background image repaints itself painfully slow. I added a JS image preloader into page.tpl.php, but it doesn't seem to help - you still see the image files getting called in the IE's status bar.

Is this an issue with the JS included? Can the image preloader be integrated somehow?

{thanks in advance - great module!}

Sherwood Stranieri
NCC Boston / Search Engine Marketing

PurpleEdge’s picture

I know exactly what you mean - my menu drives me nuts [g]!

A solution is to make the height of each LI a bit higher, which would work for a drop down. In my case this defeats the purpose somewhat because for a large menu the items can disappear off the bottom of the page and can't be selected in FF, but can be scrolled to in IE. It's also possible to change the level of overlap of submenus, which can reduce the number of mis-hits.

My compromise is to also include a standard Drupal menu, so I have the best of both worlds.

The real beauty of drop menus is that they don't require reloading of the page to traverse all the submenus - which is why I have persevered with mine.

http://www.comformark.com

holydrupal’s picture

thanks man
I search for this :D
great
now I have nice design too :D
that long menu was really bother me alot in design!

By the way in templatemonster site there are some flash dropdown menu in top which have effect and nice movement when they comes down.
Could u add this function to Nice Menus modules?
Is it possible?
Can we craete this function with JS?
www.templatemonster.com

jakeg’s picture

Its not something I'm giong to try because I can't do flash and aren't very good at javascript.

cosmicdreams’s picture

first my solution:
With version 4.7 you have a good deal of control over the menues. You could flatten your menues by rearranging them in the menu admin section.
I used a similar method to solve an issue of the menues being to tall. I just made an additional tier and called it more to handle to overage. You could just as easily make rearrange everything on one tier.

Second:
I too would like to profess my job for this module. I also like the fact that its themeable. Thank you for this.

colorado’s picture

Simply awesome.

Now if only we could choose a Vocabulary or Terms heirarchy to grab with these menus (in 4.6) and attach them to the new Categories in 4.7. Wow!

colorado’s picture

Hmm.. I bet this works with menus built by taxonomy_menu...

Anyone try it yet?

jakeg’s picture

It will work with any menu items that appear at admin > menus.

Adrian Freed’s picture

When you use clean URL's you can't see the menu id's so I hacked the menu stuff to display the id next to the menu name.

jakeg’s picture

I don't follow. The latest version of my module for 4.6, 4.7 and cvs should enable you to select a menu by name not id

Adrian Freed’s picture

sangamreddi’s picture

4.7
http://drupal.org/files/projects/nice_menus-4.7.0.tar.gz
4.6
http://drupal.org/files/projects/nice_menus-4.6.0.tar.gz
CVS
http://drupal.org/files/projects/nice_menus-cvs.tar.gz

All 3 of them have been updated and working fine. U can see them in action on my demo site too http://careers.gleez.com

Once again thank's for Jake Gordon for backporting it for 4.6.

Sunny
www.gleez.com

Adrian Freed’s picture

has
this line:

$form .= form_textfield(t('Menu Tree'), 'nice_menus_menu_'.$delta, variable_get('nice_menus_menu_'. $delta, '0'), false, false, t('The menu tree number (ID) from which to show a nice menu. Find out what this is at admin/menu and noting the ID in the URL for the menu you want to use'));

When it needs something like this:

$form .= form_select(t('Menu Tree'), 'nice_menus_menu_'.$delta, variable_get('nice_menus_menu_'. $delta, '0'), menu_parent_options(0),
t('The menu tree from which to show a nice menu.'));

(I just backported it myself)

jakeg’s picture

ah, okay, 4.6 doesn't enable you to select menu by name. Instead you have to give the menu ID. To get this, go to admin/menu and look at the ID in the URL of the menu trees there.

If someone submits a patch then I'll put it into 4.6. But I don't have time to make the patch right now myself (4.7 uses forms API, 4.6 doesn't). This isn't a critical fix (i.e. it works without it), its a usability issue.

laura s’s picture

...and now I have a drop-down selector for the menu is the settings screen.

The code change works!!

Laura
===
pingVisionrare patternscattered sunshine

_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet

Adrian Freed’s picture

I am too busy this week to make a patch as I have added other things to nicemenu (to support a nicemenu bar as primary links) and would have to go backwards to create a solid patch. Laura s confirms that my one line change does the trick so people can hack it in by hand until a patch.

I suspect this nice module is going to get a lot of use and more feature suggestions...........

jakeg’s picture

fire away with them, but be aware that most new features now will go into 4.7 and not necessarily into 4.6 unless someone else can help backport.

NEOX-1’s picture

Nice Job, it' s a very cool module!

Sorry, probably it's a stupid question, but I don't understand how to make this menu horizontal ?!

jakeg’s picture

with the module enabled, go to admin>blocks and edit the nice menu block you want to be horizontal. set its type to 'down' (i.e. menus drop down)

NEOX-1’s picture

Thanks! Now it works great! Nice Job!

NEOX-1’s picture

this module works fine with other themplates you can download, but now i try to create my own template and have some problems. i wrote this in page.tlp.php:

head
?php print $styles ?
/head

body
?php echo   "div id='navigation'    $sidebar_left    /div" ?
?php echo   "div id='content'    $content    /div" ?
/body
/html

it works fine in firefox, but in ie the dropdown menu doesn't popup. i guess i need some more code in this template, but i don't know what. can somebody help me, please?

p.s. "< >" was cleared for this forum, because it was not possible to post.

sangamreddi’s picture

Assuming your're running Drupal 4.7 beta-3.

<div><?php print $header ?></div> for Header reagion
<?php print $sidebar_left ?> for Left side
<?php print $sidebar_left ?> for right side.

Look at the default Theme (Bluemarine) U'll understand better.

Feel free to contact me.

Sunny
www.gleez.com

NEOX-1’s picture

hm, i'm using 4.6.5, but if i write:

<?php print $sidebar_left ?> 

it's still the same problem. it didn't help. :(

sherwoodseo’s picture

jakeg commented at some point that IE can't use CSS to do the flyout action, so he devised a JavaScript to handle it. The neat_menu module uses Drupal to plant a JS call right into your template... but to enable that, you have to insert this into the head section of your template:

<?php print $head ?>

Check out this page for details:
http://drupal.org/node/11812

...and let me know how it works out, cuz I got this far and then stumbled on a couple more issues with IE and Safari.

- Sherwood

NEOX-1’s picture

Now it works fine in IE and Firefox. I had upgraded from 4.6.5 to 4.7beta3 and inserted <?php print $head ?>. Thanks for this information! I didn't see you have to insert this part for IE.

mshaver’s picture

I was wondering if anyone has been able to hack the CSS to display one level of sub-menus horizontally? So the menu would be set to 'down' and the sub-menus items would display below the main links but would look similar to the top links.

Any ideas?

Mike

calbasi’s picture

I'm look for it too... any news about it?

aequor’s picture

I am looking for horizontal sub-menus to appear same as horizontal menu header. Did u get any solution for this?

slazenger’s picture

I took JakeG's nice_menu implementation and reused the CSS code directly to develop a neat drop down menu system for the primary links (top navigation). This is for a journal site I am experimentally building, using a democratica-civicspace-derived theme.

The problem is that the drop down flows down nicely when there is NO content below the navigation bar I.e. when the div containers for the usaual three columns below (div left, div center and div right) are commented out completed, the menu flows down.

When the real content is presented below, the drop downs get truncated, after the first one, and I can tell its because of the
content below.

I tried playing around the with the overflow parameter and clear parameters in CSS, but I am missing something. I think I'm missing something elementary, could someone help out.

I'm using the three-columm democratica theme.

thanks for any help!
-S

colorado’s picture

You can try using z-index: 10000; in your stylesheet for the element(s) you want to stay on top. I think you need to use also position: relative; above/before the z-index.

---
"Please drupal responsibly: give as much help as you get."

slazenger’s picture

You were right. In the meantime I did get it right and posted my solution here. "position: relative" in the top container which holds the big UL for all navbar links inline and dropdown, with a z-index of above zero, works out for IE and FF.

Here's the solution comment.
http://drupal.org/node/43899#comment-75854

-S

justinian’s picture

Hi,
Thanks for the solution. It works great. You mentioned that you are using Nice Menu for Primary links. How are you doing that? I'm using 4.6.5. Do I have to upgrade to 4.7 for that to work?
Thanks,
Justinian

sangamreddi’s picture

4.6 version of nice-menus mdoule available
Sunny                      
www.gleez.com | www.sandeepone.com

slazenger’s picture

I didn't use the module itself yet, and plan to do that later.
What I did right now is used the module's CSS files to render
the primarly links the way I wanted them to too. But to do this, I've hardcoded the

  • tree for the links in my page.tpl.php itself for now, (instead of the foreach loop). This isn't ideal, I realise, but its my short-term fix since I'm prototyping.
sangamreddi’s picture

Even i used the similar kind of ugly hack until nice menus module released.

Sunny                      
www.gleez.com | www.sandeepone.com

slazenger’s picture

You mean you have since switched to using the nice menu module directly for top navigation primary links? How did you do this? I though this will require invoking some part of nice menu code/functions from within the primarly links/header portion of page.tpl.php -- i.e. the block level functions might not be usable directly. Am I wrong, or did you do somethign else neatly? -S

ymmatt’s picture

My menus were appearing below a select box in IE 5, this is an IE bug and the only fix that I have found is to use Iframes.

I searched for at least a full week and finally Treylane solved the problem, you can download the patched .js file from here (Post # 16)

VinceDee’s picture

I love it. I've been hoping I'd happen across a drop down menu like this.

The only thing I can't figure out so far is whether I can get it to go horizontal so it can drop down menus from across the top of my page.

Thanks for the nice work

---------
The hottest Linux distribution? Ubuntu
Talk about Ubuntu Web Servers at:
http://www.ubuntuwebservers.com

jakeg’s picture

Just go into your block's settings and change its type to 'down' to get it to drop down. Of course you'll need to make enough horizontal space for all your top level items to fit in too. If you're using 4.7, I suggest putting it in the header region.

Jake
Drupal web services, London

VinceDee’s picture

I have the menu in the Navigation block that it defaults into on the left side bar. I tried already to change it over to "down" and it didn't do anything but make the menus drop straight down...but they were still stacked vertically on top of one another so it had an odd effect.

How would I get the menu into something like a header block using Drupal 4.6?

---------
The hottest Linux distribution? Ubuntu
Talk about Ubuntu Web Servers at:
http://www.ubuntuwebservers.com

jakeg’s picture

Using 4.6 you'll have to modify your theme to make a wide enough div/whatever for the menu to go in.

Jake
Drupal web services, London

elo15e’s picture

Hi,
I'm really finding your menu module fantastic - just what I needed!
How do I locate the CSS formatting for the header 'block', so that I can fit my lovely drop down menu? Is it #header?
Sorry if I'm being dum!

Claire

greg_y’s picture

Hi, Nice Menus is the perfect solution to my need for easy drop menus!

I have one issue under 4.7. When I place a nice menu in the header (in this case, Pushbutton theme), above the row of menu items is the menu name for that group of menus -- equivalent to the block title if the menus were on the sidebar. So the header looks like:

Menu Name
Drop Down Menu Item 1 ... Drop Down Menu Item 2 ... etc

Is there any way to hide that menu name line so only the actual menu items are visible? I haven't found any way to do it via simple configuration. The menu name is on a row all by itself and doesn't do anything, and I'd like the real estate back! :)

jakeg’s picture

Hmm, the CSS file with the module should automatically display: none (hide) the header. Does it do that with a different theme?

Jake
Drupal web services, London

greg_y’s picture

It looks like under Blue Marine theme the extra Menu Name row is not there -- only the actual menu items on their own row. So that looks fine.

The problem in Pushbutton may be how the Menu Name is hidden --? When I use Firefox's Web Developer toolbar to get the properties of the Menu Name row that shows up in Pushbutton, it says it's h3:

.block .title h3 (line 403)

but I don't think the Nice Menu CSS is hiding h3, only h2 --?

/* most people won't want to see the menu's title */
.block-nice_menus h2 {
display: none;

I copied those two lines and changed "h2" to "h3" but that caused ... um, interesting consequences on the rest of the page. I'm obviously showing my CSS cluenessless here.

Also, while the toolbar indicates that both the theme css and nice menus css files are being used to display the nice menu items in the header, the Menu Name row above them seems to only be using the theme css.

Hope this makes sense!

greg_y’s picture

I fixed this problem in Pushbutton theme by editing nice_menus.css to add lines after line 30:

/* most people won't want to see the menu's title */
.block-nice_menus h2 {
  display: none;
}
/* new lines start here */
.block-nice_menus h3 {
  display: none;
}

So far this hasn't had any consequences elsewhere that I can see.

justinian’s picture

I've set up a nice menu item to link to another site. Is it possible to have it open in a new window?

jakeg’s picture

not at the moment, no. For usability reasons, its suggested that links generally don't open in new windows as it disables the back button on someone's browser. if the user wants a new browser that should be their choice, and they can right click a menu and select 'open in new window/tab'

Jake
Drupal web services, London

justinian’s picture

It would be really nice to includes this feature in the module. For example, I'm linking to my cafepress store, which takes people to cafepress.com and therefore away from my site. In this case, using the back button isn't a good solution, as it could cause forms to reload.
I think your comment that people can just right click on the link assumes that people are more Web savvy than they are.

colorado’s picture

Yes, I agree that all modules and menus it should be as flexible as possible in giving site admins the option to determine how specific links will behave.

---
"Please drupal responsibly: give as much help as you get."

colorado’s picture

Yes, you can add target="_blank" to the link code in the nicemenu.module, but this will make all your nice menu links open in a new window.

If you need help on how to do that, just let me know.

---
"Please drupal responsibly: give as much help as you get."

colorado’s picture

Oh yeah, another possibility is the Links Package http://drupal.org/node/24719

---
"Please drupal responsibly: give as much help as you get."

nitrosx’s picture

Hy everybody

First let me say that I really appreciate all the work done with nice_menus module.
Works really well on my first ever drupal site.

Unfortunately, I found out that when my menu grew to the 4th level depth, the show/hide action on those levels wasn't working properly anymore.
So what??? I spent sometime and fixed the issue. Following you 'll find the patches required.

nice_menus.css.patch

--- nice_menus.css     2006-04-12 11:52:48.000000000 -0400
+++ nice_menus.css      2006-04-12 11:52:22.000000000 -0400
@@ -4,7 +4,7 @@
   <ul id='nice-menu-x' class='nice-menu nice-menu-TYPE'>
     <li><a href='#'>This is a menu item</a></li>
     <li class='menuparent'><a href='#'>A submenu</a>
-      <ul><li>...</li>
+      <ul class='submenu'><li>...</li>
       </ul>
     </li>
     ...
@@ -80,23 +80,39 @@
 }
 
 /* Show submenus when over their parents */
+/* 8 levels */
 ul.nice-menu li:hover ul,
-ul.nice-menu li.menuparent li:hover ul,
-ul.nice-menu li.menuparent li.menuparent li:hover ul,
+ul.nice-menu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul,
 ul.nice-menu li.over ul,
-ul.nice-menu li.menuparent li.over ul,
-ul.nice-menu li.menuparent li.menuparent li.over ul { 
-  display: block; 
-} 
+ul.nice-menu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul {
+  display: block;
+}
 
 /* Hide sub-menus initially */
 ul.nice-menu li:hover ul ul,
-ul.nice-menu li:hover ul ul ul,
+ul.nice-menu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul ul,
 ul.nice-menu li.over ul ul,
-ul.nice-menu li.over ul ul ul { 
-  display: none; 
+ul.nice-menu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul ul {
+  display: none;
 } 
 
+
 /* Now stuff specific to the menu type (down, left or right menu pop) */

 /* All VERTICAL (left/right) menus */

nice_menus.module.patch

 --- nice_menus.module.20060412  2006-04-12 11:54:05.000000000 -0400
+++ nice_menus.module   2006-04-12 11:34:56.000000000 -0400
@@ -111,7 +111,7 @@
     foreach ($menu['visible'][$pid]['children'] as $mid) {
       if (count($menu['visible'][$mid]['children']) > 0) {
         $output['content'].= "<li id ='menu-$mid' class='menuparent'>".menu_item_link($mid);
-        $output['content'].= "<ul>";
+        $output['content'].= "<ul class='submenu'>";
         $tmp = _nice_menu_tree($mid);
         $output['content'].= $tmp['content'];
         $output['content'].= "</ul>";

Hope that this help.

TheFazz’s picture

i've installed the nice menus for version 4.7 in a horizontal and pulldown manner. however, at level 4 it shows the submenus by default which will result in level 4 menu clashes. nitrosx's patch looks promising, however i have no idea how to administer the patch. i am using a hosting service which does not allow me to do any other than thru the cpanel and ftp (no shell access). so any alternative ways to patch?

http://www.thefazz.com/

llawnroc’s picture

Hi

I'm new to the world of Drupal (still only 2 days old!) and want to know how to use the code listed above to patch the files to get past this 4 tier issue.

Thanks

(Drupal based site in progress Llawnroc.net)

theiviaxx’s picture

The functionality is already there for level 1 through 3. Why rewrite the CSS for an additional level or two? I have tried just adding another li to the CSS as suggested in other threads, but with no luck. The CSS makes sense, just not sure it wont display that 4th level correctly. This is what i tried:

/* Show submenus when over their parents */
ul.nice-menu li:hover ul,
ul.nice-menu li.menuparent li:hover ul,
ul.nice-menu li.menuparent li.menuparent li:hover ul,
ul.nice-menu li.menuparent li.menuparent li.menuparent li:hover ul,
ul.nice-menu li.over ul,
ul.nice-menu li.menuparent li.over ul,
ul.nice-menu li.menuparent li.menuparent li.over ul,
ul.nice-menu li.menuparent li.menuparent li.menuparent li.over ul { 
  display: block; 
} 

/* Hide sub-menus initially */
ul.nice-menu li:hover ul ul,
ul.nice-menu li:hover ul ul ul,
ul.nice-menu li:hover ul ul ul ul,
ul.nice-menu li.over ul ul,
ul.nice-menu li.over ul ul ul,
ul.nice-menu li.over ul ul ul ul { 
  display: none; 
}

Can you explain why you were forced to rewrite the CSS?

mediaFarmer’s picture

Basically, nitrosx is saying:
replace this line -
$output['content'].= "<ul>";
with this line-
$output['content'].= "<ul class='submenu'>";

This adds the submenu class, which allows you to manipulate it with CSS using the example above. It works like a charm.

vinny-1’s picture

I have just installed this great module, but I am having a small problem with it. Whenever the dropdown menu expands over an existing link that is part of my main content, the dropdown menu disappears. So the dropdown disppears when I put my mouse over the dropdown item that is hovering over the existing hyperlink in my main content.

Hopefully this makes sense. Can anyone give me a hint on how to fix this?

Thanks

sumith’s picture

can u plz tell me any site where i can see how this drop down works...bez i have installed i m not finding any change even after using...plz can u help me

jakeg’s picture

http://www.ukmortgageangels.co.uk/ uses it. Make sure to go into your blocks and turn the block on, and maybe change the block's settings to left/right/down as well.

Jake
Drupal web services, London

bran10’s picture

Hey all,

Haven't had a real indepth look at it yet, but how do you go about centering the drop downs(horizontal menu dropping down)? Currently I've got it left aligned on the header block. Be good if I could have it in the middle. Obviously it's in the .css file somwhere...

- B

anner’s picture

I can't get my Horizontal Nice Menu to center in my header. It will float left or right fine, but when I tell it middle or center, it adds more space beneath it and floats left. Anyone got this to work?

I'm using BlueMarine theme (in 4.7). I also tried adding a center to the div tag for the header in my page.tpl.php:

<td colspan="2"><div align="center"><?php print $header ?></div></td>

with no luck.

navidifamily’s picture

hi all!
pleeease someone help us...
we work with drupal 4.6
we use spreadfirefox theme in our site &
we add a horizontal nice menu to our site with adding the following code in page.tpl.php :

         $block = module_invoke('nice_menus', 'block', 'view', 2);
          print $block['content'];
       

& we don't miss our menu items but
this is our problem:
*when we add the menu in the body of our site menu opens correctly but it pushes down all the page contents!
*when we add it to the header the first submenu opens on the menu title and also the menu opens in DOWN-UP DIRECTION!!!!!

thanQ

SH3RKHAN’s picture

change some codes in the css files
in firefox or opera (ctrl+F3) you can view all codes that pertain to the page in question
search for the css file then the style
then change some padding
that's it...
i think...

;0

:::: SH3RKHAN ::::
the ultimate one

SH3RKHAN’s picture

nice work
saved my day!

:::: SH3RKHAN ::::
the ultimate one

Ole Martin’s picture

I started whit Nice Menu today, and it's easy and "nice" to work whit. My site is not finish but I take one step eatch time. Soon I will start whit my template. This is a site for parents in Norway. http://foreldrekontakten.com/nasjonalt I think that my Joomlasite will be replaced whit Drupal. Drupal are so easy to work whit.

Ole Martin
http://renseri.net (joomla)
http://foreldrekontakten.com (it's Joomla still )
http://foreldrekontakten.com/nasjonalt (My first step with Drupal)

pritisolanki’s picture

Hello jakeg,

I am trying your nice menu which a very good functionality for newbie like us who just started exploring drupal.Can you tell me why i am missing the secodn and third stage naviation??it just show first level and i am missing with the arrow image also.any idea what can one do?

Waiting for your positive response .

Kind regards,
Priti

pritisolanki’s picture

Hello,

Nicemodule works fine with 4.7 also if you have created a correct navigation structure in your druapl menu then nice menu works very smooth.:-)
thanks jakeg its works perfect for me for now

Best Regards
Priti

hitesh pherwani’s picture

hi
i m using NiceMenus....i have put contents in nice menus...when i log in and i can see the nicemenus and content in it..but when i log out and view as anonymous user i cant see nice_menus and content in that..but i have give permission to access contents and also menu..to anonymous user plz helpcan any one tell me where i have gone wrong...and also intrestingly it is coming proper in firefox and also
view source of IE

Regards,

Hitesh

onecreative’s picture

Title says it all really...

I am using Drupal 4.7.4 and latest build of Nice Menus... I would like to display a drop down menu for some primary links in the header. It seem however, that most themes (aside from blue marine) include the header in what seems to be a major content area. This really isn't effiecient by any means of developing I see... maybe for bread crumbs, but not in application of drop downs.

In my admin/block settings, I am choosing header (friends electric) to display my nice menus... and the header block is in the content area.

Axel_V’s picture

I'm using Bluemarine which draws a line under each Menu block. I didn't have a problem with it yet but since I tried out Nice menu I want to get rid of it. Can anybody help? I know it's probably a theme related issue but I don't know how to tackle this.

cheers, xl

Axel_V’s picture

Just in case somebody has similar problems.
When overriding the stylesheet you have to override the border-bottom of the block. Something like this

#block-nice_menus-1 {
    border-bottom: 0px 
  }
averacruz’s picture

Greetings! Love the module so far, and just about have it configured to replace our aging Javascript version. However, since I am just beginning to dive into CSS, I was hoping someone could assist me. In the readme file, there is code listed that will allow me to remove the background color for the top-level menu items. However, I am actually wanting to simply have my top-level items have a black background with white text, while my sub-menu items should have a #CCCCCCC background color, with black text. I cannot seem to get this to work for the life of me. Every time I make a change, it seems to affect both top and sub-menu items. I know they can be controlled separately, because the code to remove the background does just that.

Secondly, like others here, I would like to center and distribute my menu items across the top of my screens full width. I've tried playing with some margin settings, but thought there might be a cleaner way.

Qudsiyya’s picture

Hi,

I am facing the same situation. Did you find a solution to your problems?

Please share

Regards,
Qudsiyya

sun’s picture

Just in case someone of you was or is in the need of a simple Administration Menu instead of a user menu: You should definitely have a look at Drupal Administration Menu.

Ted (maintainer of SimpleMenu) and I are elaborating on a module merger currently.

Daniel F. Kudwien
unleashed mind

Daniel 'sun' Kudwien
makers99

timoratd’s picture

I am using Drupal 5.1.

I installed and patched nice_menu, but it does not work at IE6 at all, and make my homepage look funny at IE7, all contents moved to right side of screen, I am using the original zen theme...

just tested theme nokoala (patched), the drop down menu works great.

justinian’s picture

I can't get the nice menus to work in IE 7. A user can hover over the dropdown, but when they go to click on it, the dropdown disappears. Any thoughts?

anner’s picture

I had this happen. What it was was that the submenus/dropdown displayed just far enough away from the parent that it was impossible to mouse from one to the other to click on something in the submenu. I had to fuss with the CSS until that space went away.

monstordh’s picture

I'm using custom css/code for my drop-down nav from a previous CMS site structure. However, being new to Drupal, I don't know how to tell Drupal to output the children of my primary links (I'm not that familiar with PHP yet). Can anyone help me? I just want my primary nav to output my primary menu structure ALONG WITH the children of each primary link. This will allow me to style it to work with my own drop-down menu code.

thanks!
-darren

sajid’s picture

Hi Ross
I really liked your theme. Very nice and elegant design.

Just wondering if you could assist in enabling javascript in the theme.

Sajid

moog’s picture

It works fine with frefox but doesn't work so well with IE. In IE the whole "li" isnt button so you can hover the expanded menu.

Also Im having another problem. The expanded menu appears behind my website design.

Janar

yogitha’s picture

hi sangamreddi this module is really awesome thanks for your suggestion. before seeing this post i thought of writing a module for this kind of look .Nice Menu saved lot of time .

christian_gnoth’s picture

take a look at:

Drop Down Menu

summit’s picture

Thats an excellent write-up, thanks! Greetings, Martijn

Jason10121’s picture

K, so I tried that and I had two different things. I had the pages like they normally are and the Nice Menu, but I only want one that drops down...I know that's not a very good explanation, but that's all I got. Any help here?